package com.briup.corejava.day03;

/**
 * 1、强制类型转换
 */
public class Test2 {
    public static void main(String[] args) {
        // 赋值
        int i = (int)2200000000L;
        float f = (float) 12.14;
        // 小数取整
        i = (int) f;
        // 计算
        byte b = 10;
        short s = 20;
        char c = 30;
        byte r1 = (byte) (b + s + c);

        byte b1 = (byte) 130;
        System.out.println(b1);

        byte b2 = 3;
        byte b3 = 4;
        byte r3 = 3 + 4;
        int r2 = b2 + b3;
    }
}
